#include <stdio.h>

int main() {
//    std::cout << "Hello, World!" << std::endl;
    /*   printf("shuchu -->:%s", "hhh");
       printf("int = %d %d %d\n",10,20,30);
       printf("char = %c %c %c\n",'X','Y','Z');
       printf("string = %s\n","welcome to china!");
       printf("float = %f\n",3.14159267);
       printf("float = %e\n",131492834.23234323);
       printf("=================================\n");
       printf("dec = %d\n",10);
       printf("oct = %#o\n",10);
       printf("hex = %#x\n",10);*/

/*    printf("%c=%d\n",'A','A');
    printf("%c=%d\n",'A'+32,'A'+32);
    printf("%c=%d\n",'1','1'-48);*/

/*
int a=10,b=20;
int c=0;

a=100;
    printf("a=%d b=%d c=%d",a,b,c);
*/
//需求，随机输入3个数，按照由小到大排序输出：
//解决方案思路：两个数对比，把小的放在前面，借助于零时变量t
/*float a=99.0f,b=33.5f,c=77.0f,t;
 //   scanf("%f,%f,%f",&a,&b,&c);
    if(a>b){
       t=b;  //把值小的给到变量t
       b=a;  //大值给小值 a 给到b
       a=t;  //零时遍历本身是小的那个值，赋值给a
    }

    if(a>c){
        t=c;  //把值小的给到变量t
        c=a;  //大值给小值 a 给到c
        a=t;  //零时遍历本身是小的那个值，赋值给a
    }

    if(b>c){
        t=c;
        c=b;
        b=t;
    }

    printf("%f %f %f",a,b,c);*/


/*
    int number=0,totalNumber;
    for(int i=0;i<=100;i++){
        totalNumber=i+totalNumber;
    }

    printf("%d",totalNumber);

*/

// 需求：1-0 存储到数组里面，然后倒序输出
    int a[10];
    for (int index = 0; index < 10; index++) {
        a[index] = index;
    }

    for(int pos=10;pos>=0;pos--){
        printf("%d",a[pos-1]);
        printf("\n");
    }


    return 0;
}
